package abstractEntities;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.GenericGenerator;

import entities.Team;

/**
 * AbstractTeamranking entity provides the base persistence definition of the
 * Teamranking entity. @author MyEclipse Persistence Tools
 */
@MappedSuperclass
public abstract class AbstractTeamranking implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 7125501375014941665L;
	private Integer idRankingT;
	private Team teamByIdTeam3;
	private Team teamByIdTeam2;
	private Team teamByIdTeam5;
	private Team teamByIdTeam4;
	private Team teamByIdTeam1;
	private Date date;

	// Constructors

	/** default constructor */
	public AbstractTeamranking() {
	}

	/** minimal constructor */
	public AbstractTeamranking(Date date) {
		this.date = date;
	}

	/** full constructor */
	public AbstractTeamranking(Team teamByIdTeam3, Team teamByIdTeam2,
			Team teamByIdTeam5, Team teamByIdTeam4, Team teamByIdTeam1,
			Date date) {
		this.teamByIdTeam3 = teamByIdTeam3;
		this.teamByIdTeam2 = teamByIdTeam2;
		this.teamByIdTeam5 = teamByIdTeam5;
		this.teamByIdTeam4 = teamByIdTeam4;
		this.teamByIdTeam1 = teamByIdTeam1;
		this.date = date;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "idRankingT", unique = true, nullable = false)
	public Integer getIdRankingT() {
		return this.idRankingT;
	}

	public void setIdRankingT(Integer idRankingT) {
		this.idRankingT = idRankingT;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idTeam3")
	public Team getTeamByIdTeam3() {
		return this.teamByIdTeam3;
	}

	public void setTeamByIdTeam3(Team teamByIdTeam3) {
		this.teamByIdTeam3 = teamByIdTeam3;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idTeam2")
	public Team getTeamByIdTeam2() {
		return this.teamByIdTeam2;
	}

	public void setTeamByIdTeam2(Team teamByIdTeam2) {
		this.teamByIdTeam2 = teamByIdTeam2;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idTeam5")
	public Team getTeamByIdTeam5() {
		return this.teamByIdTeam5;
	}

	public void setTeamByIdTeam5(Team teamByIdTeam5) {
		this.teamByIdTeam5 = teamByIdTeam5;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idTeam4")
	public Team getTeamByIdTeam4() {
		return this.teamByIdTeam4;
	}

	public void setTeamByIdTeam4(Team teamByIdTeam4) {
		this.teamByIdTeam4 = teamByIdTeam4;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idTeam1")
	public Team getTeamByIdTeam1() {
		return this.teamByIdTeam1;
	}

	public void setTeamByIdTeam1(Team teamByIdTeam1) {
		this.teamByIdTeam1 = teamByIdTeam1;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "date", nullable = false, length = 10)
	public Date getDate() {
		return this.date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

}